<?php
/**
 * Created by PhpStorm.
 * User: tt
 * Date: 2017/12/26
 * Time: 10:39
 */

namespace app\admin\model;

use think\Model;

class Store extends Model
{
    public function getDeparIdTextAttr($value,$data){
        $depar = db('depar')->select();
        $depar_tem = array();
        foreach($depar as $k1=>$v1){
            $depar_tem[$v1['depar_id']] = $v1['name'];
        }
        return $depar_tem[$data['name_prefix']];
    }
}